package com.learn.ch02.pojo;

/**
 * @author DJJ_F
 * @version 1.0
 * @date 2025/02/14
 * @description 简单数据类型的绑定
 */
//@Component
//@ConfigurationProperties("user.a")
public class User {
    private String name;
    private Boolean gender;
    private Integer age;
    private Address addr;

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", gender=" + gender +
                ", age=" + age +
                ", addr=" + addr +
                '}';
    }

    public void setAddr(Address addr) {
        this.addr = addr;
    }

    public User() {
    }

    public User(String name, Boolean gender, Integer age) {
        this.name = name;
        this.gender = gender;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Boolean getGender() {
        return gender;
    }
    // yml的键是跟着set方法来的，不是属性名
    public void setGenderabc(Boolean gender) {
        this.gender = gender;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
